package com.nuanshui.heatedloan.userinfo.dal.mapper;

import com.nuanshui.heatedloan.userinfo.model.UserInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface UserContactMapper {

	void saveUserContact(@Param("sourceUserId") String sourceUserId, @Param("targetUserId") String targetUserId, @Param("type") Integer type);

	void updateContactTime(@Param("sourceUserId") String sourceUserId, @Param("targetUserId") String targetUserId, @Param("type") Integer type);

	Long isContacted(@Param("sourceUserId") String sourceUserId, @Param("targetUserId") String targetUserId, @Param("type") Integer type);

	List<UserInfo> loadLatestContactUser(@Param("userId") String userId, @Param("pager") Pageable pager);

	List<Long> loadLatestTargetIds(@Param("sourceUserId") String sourceUserId, @Param("type") Integer type, @Param("pager") Pageable pager);
}
